package com.hxht.cmp.pojo;

import com.hxht.cmp.entity.CourtRoom;

import java.util.ArrayList;
import java.util.List;

/**
 * @author alice on 2017/8/25 0025.
 * @version 1.0
 * @since 1.0
 */
public class CourtroomEx extends CourtRoom {
    private List<CourtroomCfg> configs;

    public CourtroomEx(CourtRoom courtRoom) {
        this.setCourtUid(courtRoom.getCourtUid());
        this.setDeviceIp(courtRoom.getDeviceIp());
        this.setDeviceType(courtRoom.getDeviceType());
        this.setFtpPort(courtRoom.getFtpPort());
        this.setFtpPsw(courtRoom.getFtpPsw());
        this.setFtpUser(courtRoom.getFtpUser());
        this.setId(courtRoom.getId());
        this.setMode(courtRoom.getMode());
        this.setName(courtRoom.getName());
        this.setPush(courtRoom.getPush());
        this.setRemote(courtRoom.getRemote());
        this.setSequence(courtRoom.getSequence());
        this.setStatus(courtRoom.getStatus());
        this.setStoreFashion(courtRoom.getStoreFashion());
        this.setStoreIp(courtRoom.getStoreIp());
        this.setStoreSwitch(courtRoom.getStoreSwitch());
        this.setUid(courtRoom.getUid());
        this.setActive(courtRoom.getActive());
        this.setAppId(courtRoom.getAppId());
        configs = new ArrayList<>();
    }

    public boolean addConfig(CourtroomCfg courtroomCfg){
        return configs.add(courtroomCfg);
    }

    public List<CourtroomCfg> getConfigs() {
        return configs;
    }

    public void setConfigs(List<CourtroomCfg> configs) {
        this.configs = configs;
    }
}
